#!/bin/bash
#kafka cluster



if [ "$1" == "start" ];then
	${kafka_dir}/bin/kafka-server-start.sh -daemon ${kafka_dir}/config/server.properties
elif [ "$1" == "stop" ];then
	${kafka_dir}/bin/kafka-server-stop.sh -daemon ${kafka_dir}/config/server.properties
elif [ "$1" == "status" ];then
    netstat -unltp | grep :${port} &> /dev/null
    [ $? -eq 0 ] && echo ok || echo no
else
	echo "start | stop | status"
fi